cmake_minimum_required(VERSION 3.13...3.27)

include(/home/umeko/pico-sdk/pico_sdk_init.cmake)



# tinyUSB所需的配置
set(FAMILY rp2040)
set(BOARD pico_sdk)
set(TINYUSB_FAMILY_PROJECT_NAME_PREFIX "tinyusb_dev_")
# Provide an LWIP path for net_lwip_webserver in case the module does not exist in tinyusb
set(TINYUSB_LWIP_PATH ${PICO_LWIP_PATH})
# Some examples use this, and we need to set this here due to a bug in the TinyUSB CMake config
set(PICO_SDK_PATH "/home/umeko/pico-sdk/")
set(PICO_TINYUSB_PATH ${PICO_SDK_PATH}/lib/tinyusb)
set(TOP ${PICO_TINYUSB_PATH})
include(${PICO_SDK_PATH}/lib/tinyusb/hw/bsp/family_support.cmake)
# add_subdirectory(${PICO_TINYUSB_PATH}/examples/device tinyusb_device_examples)

project(dev_hid_composite C CXX ASM)
pico_sdk_init()



add_executable(dev_hid_composite)

target_sources(dev_hid_composite PUBLIC
        ${CMAKE_CURRENT_LIST_DIR}/src/main.c
        ${CMAKE_CURRENT_LIST_DIR}/src/usb_descriptors.c
        )

target_include_directories(dev_hid_composite PUBLIC
        ${CMAKE_CURRENT_LIST_DIR}/src/)

# pull in common dependencies
target_link_libraries(dev_hid_composite PUBLIC pico_stdlib pico_unique_id tinyusb_device tinyusb_board)

# create map/bin/hex file etc.
pico_add_extra_outputs(dev_hid_composite)
